import os
import platform

THIS_DIR = os.path.dirname(__file__)
UI_FOLDER = os.path.join(THIS_DIR, 'ui')
OUT_FOLDER = os.path.join(THIS_DIR, 'src', 'ui_elements')

files = ['window.ui', 'task.ui', 'settings.ui']

if platform.system() == "Windows":
    os.environ['path'] += ';c:\python26\scripts'

for f in files:
    outfile = f.split('.')[0] + '.py'
    os.system('pyside-uic -o %s %s' % (os.path.join(OUT_FOLDER, outfile), os.path.join(UI_FOLDER, f)))